package com.intramirror.wd.common.bean;

import lombok.Getter;




public enum ErrorCode {
        BAD_REQUEST(400, "请求无效"),
        UNAUTHORIZED(401, "未授权"),
        ACCESS_DENIED(403, "拒绝访问"),
        NOT_FOUND(404, "资源未找到"),
        METHOD_NOT_ALLOWED(405, "方法不被允许"),
        CONFLICT(409, "请求资源状态冲突"),
        SERVER_ERROR(500, "服务器内部错误");
        @Getter
        private Integer code;
        @Getter
        private String error;

        ErrorCode(Integer code, String message) {
            this.code = code;
            this.error = message;
        }

        public Integer getCode() {
            return code;
        }

        public String getError() {
            return error;
        }


}


